<template>
	<view>
		<!-- <u-navbar :is-back="true" :is-fixed="true" title="基地详情"></u-navbar> -->

		<free-list-item title="基地名称：" :showRight="false" :showRightIcons="false" :showLeftIcon="false">
			<text slot="right" class="font-14 text-A0A0A0">{{newlist.baseName}}</text>
		</free-list-item>
		<free-list-item title="联系人：" :showRight="false" :showRightIcons="false" :showLeftIcon="false">
			<text slot="right" class="font-14 text-A0A0A0">{{newlist.contacts}}</text>
		</free-list-item>
		<free-list-item title="联系电话：" :showRight="false" :showRightIcons="false" :showLeftIcon="false">
			<text slot="right" class="font-14 text-A0A0A0">{{newlist.phone}}</text>
		</free-list-item>
		<free-list-item title="基地位置：" :showRight="false" :showRightIcons="false" :showLeftIcon="false">
			<text slot="right" class="font-14 text-A0A0A0">{{newlist.baseAddress}}</text>
		</free-list-item>
		<free-list-item title="基地面积(m²)：" :showRight="false" :showRightIcons="false" :showLeftIcon="false">
			<text slot="right" class="font-14 text-A0A0A0">{{newlist.baseArea}}</text>
		</free-list-item>
		<free-list-item title="基地产品介绍：" :showRight="false" :showRightIcons="false" :showLeftIcon="false">
			<text slot="right" class="font-14 text-A0A0A0">{{newlist.productIntroduce}}</text>
		</free-list-item>
         <view class="dfel py-3 pr-3 pl-3">
			 <view class="font-16">基地照片</view>
			 <img class="text-right" style="width: 142px; height: 88px;" :src="getFullImageUrl(newlist.basePhoto)" alt="" />
		 </view>
	</view>
</template>

<script>
	import $H from '@/common/free-lib/request.js';
	import {
		getImageUrl
	} from '@/common/free-lib/util.js';
	import freeListItem from "@/components/free-ui/free-list-item.vue";
	export default {
		components: {
			freeListItem,
		},
		data() {
			return {
                newlist:{}

			}
		},
		
		computed: {

		},
		onLoad(options) {
			const id = options.id;
			this.NewListDetail(id)
		},
		methods: {
			// 拼接图片方法
			getFullImageUrl(imagePath) {
				return getImageUrl(imagePath);
			},
            NewListDetail(id) {
            	$H.get('/agriculture/baseInform/queryById', {
            		id: id
            	}, {}).then(res => {
            		this.newlist = res.result
            	}).catch(error => {
            		uni.showToast({
            			title: "网络错误，请稍后再试",
            			icon: 'none'
            		});
            	});
            },
		}
	}
</script>

<style>
</style>